1. Field of the Invention
Exemplary embodiments of the invention generally relate to a method of freeing computer resources by a user in a multitasking and windowing environment, and more particularly, to a method of pausing an open application program that includes pausing the processing of the open application program by the central processing unit and removing the program code of the open application program, which is paused, from main memory to mass storage, when another open application program requires additional main memory.
2. Description of the Related Art
Personal computers (PCs) can run numerous application programs simultaneously in a multitasking and windowing environment. An open application program requires operation of many computer resources, including, for example, a central processing unit (CPU), memory, an operating system, a task manager of the operating system, an Application Program Interfaces (API), and a Graphical User Interface (GUI). Memory is typically divided into main memory, that is, Random Access Memory (RAM), which responds quickly, and mass storage, for example, a hard disk, which responds more slowly but is relatively less expensive per unit of memory. A GUI is typically a computer display screen. An open application program has a portion of its computer code residing in main memory, so that the CPU may quickly implement or run the application program. The open application program may also store data, to which it frequently refers, in the main memory so as to further speed implementation of the program.
There exist trade-offs when trying to run numerous application programs simultaneously and quickly in a multitasking environment. To run as quickly as possible, an application program should store all of its program code and its data in the more quickly responding main memory, so as to avoid the longer access times associated with calls to mass storage. However, when running numerous application programs, or even some single application programs, there is typically not enough of the relatively more expensive main memory in which to store all of the applications program's code and data. Therefore, today's personal computers employ virtual memory management to speed running of numerous application programs by storing application program code and data, which is likely to be frequently accessed by the CPU, in main memory and by storing application program code and data, which is less likely to be frequently accessed in mass storage.
Virtual memory management solves the problem of speedily running numerous application programs by swapping code and data needed to run application programs back and forth between main memory and mass storage. For example, whenever instructions from a particular portion of program code are to be executed, the particular portion of program code is loaded into main memory. Other portions of program code may reside in mass storage, for example, a hard disk, until needed. If a particular portion of program code or data does not reside in main memory and access to that particular portion of program code or data is attempted, the CPU will generate a “not present” interrupt to notify the operating system of the problem. The operating system then directs loading of the absent particular portion of program code or data into an available area of main memory and restarts the interrupted application.
A counterpart to loading to-be-executed program code or data from mass storage to main memory occurs when a least frequently used portion of program code or data residing in main memory is sent to mass storage to make available main memory space for the to-be-executed program code or data. The swapping of program code and data to and from mass storage and main memory are transparent to the running open application program because the application program neither processes the interrupt, nor manages the swapping of program code and data between main memory and mass storage.
The application program only sees a virtual address space associated with the program code or data that resides in a virtual memory. The virtual memory management of the operating system then maps an application program's request for program code or data to a virtual memory address, which may be located in either of main memory or mass storage. The virtual memory management then swaps program code or data back and forth between main memory and mass storage to maintain the most frequently accessed program code or data in main memory.
An open application program is typically associated with the display of an application window and a task button. When several application programs are open, several corresponding application windows may be cascaded, stacked, displayed side by side or hidden behind one another on the display screen. Several open application programs are also associated with several corresponding task buttons located on a taskbar, usually displayed at the bottom or side of the display screen. A task button usually includes an icon and text to identify the open application program with which the task button is associated. A task button may also be used to minimize, maximize, and restore an application window and even to close, an open application program, its application window, and its task button.
As shown in FIG. 1, even when several application programs are open and several corresponding application windows and task buttons are displayed on a display screen 110, from the user's viewpoint, there is but a single application window containing a display or document with which the user may interact by, for example, mouse clicks, cursor movements, commands, text entry, scrolling, highlighting or printing. This single application window with which the user interacts is the active window 120. The task button 130 corresponding to the active window 120 is visually distinguished from other task buttons 150 corresponding to other inactive application windows 140. For example, the task button 130 associated with the active window 120 may be distinguished by a deeper shade. When several application programs are open, there is but one task button 130 corresponding to the active window 120, while the other task buttons 150, 160 are associated with inactive or minimized windows, respectively. However, each of the inactive windows 140 corresponding to the other open application programs may readily be switched from inactive to active by clicking on either the inactive window 140 or its corresponding task button 150. A task button 160, associated with a minimized window of another open application program, may also be readily switched to displaying an active window and its corresponding active task button, by clicking on the task button 160 associated with the minimized window.
While the user may not be interacting with an inactive application window, the open application program associated with this inactive widow is, however, still running and using the computer's main memory, CPU, and other resources. This situation has the undesirable effect of slowing down the open application program associated with the active window by reducing the amount of main memory available, the number of CPU cycles available per unit of time, and the availability of other computer resources. When there are several open application programs, each open application program further reduces the main memory, CPU cycles and other resources available to the open application program associated with the active window. Since the user is only interacting with the open application program displayed in the active window, the slowing down of this open application program is readily apparent. Of course, it is not only the open application program associated with the active window that is being slowed, it is all of the open application programs.
The slowing down of open application programs may be particularly evident when the user conducts a search on the Internet or accesses web services available on the Internet. When a user opens a web browser application, e.g., Internet Explorer Browser®, to view multiple web browser windows, each web browser window requires that a data structure, called a Document Object Model (DOM), be stored in the computer's main memory. Some web browser windows consume large amounts of the computer's main memory and CPU operations, even when the user is not interacting with the opened web browser's window. Web services, on the other hand, typically communicate using verbose XML messages, requiring much processing, between a client PC and a remote server.
When several application programs are opened, a user may speed the running of a selected open application program by closing one or more of the other open application programs to free computer resources. However, if the user then wishes to access one of these formerly closed application programs, this application program must be re-started by activating the application program's icon on the desktop, in the Start menu, or entering the application program's path on an address bar or the Start menu's run command. Upon re-starting the formerly closed application program, the operating system now must load at least a portion of the program code and data of the to-be-re-started application program into main memory, so that the program may be implemented by the CPU. Re-starting an application program is just like starting an application program anew and starting an application program takes longer than switching from an open application program with an inactive or minimized window to the same open application with an active window.
There remains a need to overcome the problem of the slowing down of open application programs, when multiple application programs are open, without necessarily closing one or more of the application programs and while maintaining a display presence of each of the application programs for the user.